<template>
  <div id="app">
    <Header :key="updataK" @updataKeyFn='updataKeyFn'/>
    <Nav @updataKeyFn='updataKeyFn'/>
    <router-view />
    <Footer />
    <Denglu @updataKeyFn="updataKeyFn"/>
    <transition name="fade">
    <Toast v-show="$store.state.toast.isTishi"/>
    </transition>
  </div>
</template>
<script>
import Header from "@/components/Header.vue";
import Nav from "@/components/Nav.vue";
import Footer from "@/components/Footer.vue";
import Denglu from "@/components/Denglu.vue";
import Toast from "@/components/Toast.vue";
export default {
  data() {
    return {
      updataK:0
    };
  },
  components: {
    Header,
    Nav,
    Footer,
    Denglu,
    Toast,
  },methods:{
    updataKeyFn(){
      this.$store.state.updataKey++
    }
  }
};
</script>
<style lang="less">
.fade-enter-active,
.fade-leave-active {
  transition: opacity 1s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
</style>
